#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MAXN = 1007;
int prime[MAXN], p_cnt;
bool not_p[MAXN];
set<int> yu[MAXN];
void Init() {
    for (int i=2; i<MAXN; ++i) {
        if (!not_p[i]) {
            prime[p_cnt++] = i;
        }
        for (int j=0; j<p_cnt&&i*prime[j]<MAXN; ++j) {
            not_p[i*prime[j]] = true;
            if (i%prime[j] == 0) {
                break;
            }
        }
    }
    for (int j=0; j<p_cnt; ++j) {
        int len = prime[j];
        set<int>& S = yu[j];
        for (int i=0; i<len; ++i) {
            S.insert(i*i%len);
        }
    }
}
inline LL getYu(char* s, int p) {
    int len = strlen(s);
    LL ret = 0;
    for (int i=0; i<len; ++i) {
        ret = (ret * 10 + s[i] - '0') % p;
    }
    return ret;
}
LL FastPOW(LL a, LL k, LL p) {
    LL ret = 1;
    while (k) {
        if (k&1) {
            ret = (ret * a) % p;
        }
        k = (k>>1);
        a = (a*a) % p;
    }
    return ret;
}
int solve(char* s) {
    char flag1 = 1;
    char flag2 = 1;
    for (int i=0; i<p_cnt; ++i) {
        int p = prime[i];
        LL rem = getYu(s, p);
        if (!yu[i].count(rem)) flag2 = 0;
        int ask = rem*(rem-1+p)*FastPOW(2, p-2, p)%p;
        if (!yu[i].count(ask)) flag1 = 0;
        if (!flag1 && !flag2) break;
    }
    return ((flag1<<1)+flag2);
}
char buf[207];

int main() {
#ifdef hai
    freopen("in.txt", "r", stdin);
#endif
    Init();
    int T;
    scanf("%d", &T);
    while (T--) {
        scanf("%s", buf);
        int t = solve(buf);
        switch(t) {
            case 3 :
                printf("Arena of Valor\n");
                break;
            case 1 :
                printf("Hearth Stone\n");
                break;
            case 2 :
                printf("Clash Royale\n");
                break;
            case 0 :
                printf("League of Legends\n");
        }
    }
    return 0;
}
